package com.itheima.testjian;

/**
 * @author 杨德甫
 */
public class reverceArr {
    public static void main(String[] args) {
        int[][] arr = {{77,36,25}, {46,708,108}};

        //取出每一个数组
        for (int i = 0; i < arr.length; i++) {
            //取出每一个数组中 的 每一个数
            for (int j = 0; j < arr[i].length; j++) {
                System.out.println(arr[i][j]);
            }
        }
    }


    //数组反转
    private static void fanZhuan() {
        int[] arr = {15, 35, 56, 77, 108, 3};
        //定义开头
        int start = 0;
        //定义结尾
        int end = arr.length - 1;

        //交换元素
        for (; start < end; start++, end--) {
            int temp = arr[start];
            arr[start] = arr[end];
            arr[end] = temp;
        }

        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }


}
